﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using EZCRS.HCMS.Entity;
using EZCRS.HCMS.SqlClient;

namespace EZCRS.HCMS.Bll.baseinfo
{
    public class BllPropType
    {
        /// <summary>
        /// 获得所有
        /// </summary>
        /// <param name="languagetype"></param>
        /// <returns></returns>
        public List<HCRS_Proptype> getallproptype(int languagetype)
        {
            return new sql_hcrs_proptype().getallproptype(languagetype);
        }

        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public bool deleteproptype(int id)
        {
            return new sql_hcrs_proptype().delproptype(id);
        }

        /// <summary>
        /// 新增或修改
        /// </summary>
        /// <param name="popid"></param>
        /// <param name="popcode"></param>
        /// <param name="popname"></param>
        /// <param name="languagetype"></param>
        /// <returns></returns>
        public bool insertorupdate(int popid,string popcode,string popname,int languagetype)
        {
            HCRS_Proptype _pop = new HCRS_Proptype();
            _pop.Id = popid;
            _pop.languagetype = languagetype;
            _pop.propcode = popcode;
            _pop.propname = popname;

            return new sql_hcrs_proptype().insertorupdate(_pop);
        }

    }
}
